package ppp.hhh.the;

import jakarta.validation.ConstraintValidator;
import ppp.hhh.the.annotation.MyCustomConstraint;

public class MyCustomConstraintValidator implements ConstraintValidator<MyCustomConstraint, String> {
    @Override
    public boolean isValid(String value, jakarta.validation.ConstraintValidatorContext context) {
        return value.equals("上海") || value.equals("北京");
    }
    @Override
    public void initialize(MyCustomConstraint constraint) {
    }
}
